package com.hqq.create.singleton;

import java.util.Vector;

/**
 * SingletonTest
 * Created by heqianqian on 2017/3/10.
 */
public class SingletonTest {
    private static SingletonTest instance = null;
    private Vector properties = null;


    public Vector getProperties() {
        return properties;
    }

    private SingletonTest() {
    }

    private static synchronized void init(){
        if (instance==null){
            instance = new SingletonTest();
        }
    }

    public static SingletonTest getInstance(){
        if (instance==null){
            init();
        }
        return instance;
    }

    public void updateProperties(){
        SingletonTest singletonTest = SingletonTest.getInstance();
        singletonTest.getProperties();
    }
}
